package br.com.Opet.PIM.Controle;

import org.apache.log4j.Logger;

import br.com.Opet.PIM.Logger.LoggerPIM;
import br.com.Opet.PIM.Persistencia.LoginDao;

public class ControleLogin implements ControlePai{

	private final String NOME_CLASSE = this.getClass().getName();

	private final Logger logger = LoggerPIM.getLogger(NOME_CLASSE);
	
	public ControleLogin(){
		logger.info("Iniciando classe [" + NOME_CLASSE + "]");
	}
	
	/**
	 * Recupera o Item.
	 * @throws Throwable 
	 */
	@Override
	public Object recuperaItem(Object object) throws Throwable {
		LoginDao dao = new LoginDao();
		return dao.recuperaItem(object);
	}

	/**
	 * Cadastrar o Item.
	 */
	@Override
	public Object cadastrarItem(Object object) {
		LoginDao dao = new LoginDao();
		return dao.cadastrarItem(object);
	}

	/**
	 * Editar o Item.
	 */
	@Override
	public Object editarItem(Object object) {
		LoginDao dao = new LoginDao();
		return dao.editarItem(object);
	}

	/**
	 * Excluir o Item.
	 */
	@Override
	public Object excluirItem(Object object) {
		LoginDao dao = new LoginDao();
		return dao.excluirItem(object);
	}

}
